home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / etc / init.d / single < prev    next >
Text File  |  2008-10-14  |  590b  |  36 lines

  1. #! /bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides:          single
  4. # Required-Start:    $local_fs $all killprocs
  5. # Required-Stop:
  6. # Default-Start:     1
  7. # Default-Stop:
  8. # Short-Description: executed by init(8) upon entering runlevel 1 (single).
  9. ### END INIT INFO
  10.  
  11. PATH=/sbin:/bin
  12.  
  13. . /lib/lsb/init-functions
  14.  
  15. do_start () {
  16.     log_action_msg "Will now switch to single-user mode"
  17.     exec init -t1 S
  18. }
  19.  
  20. case "$1" in
  21.   start)
  22.     do_start
  23.     ;;
  24.   restart|reload|force-reload)
  25.     echo "Error: argument '$1' not supported" >&2
  26.     exit 3
  27.     ;;
  28.   stop)
  29.     # No-op
  30.     ;;
  31.   *)
  32.     echo "Usage: $0 start|stop" >&2
  33.     exit 3
  34.     ;;
  35. esac
  36.